# Maintainer: David Runge <dvzrv@archlinux.org>
# Contributor: Joakim Hernberg <jhernberg@alchemy.lu>
# Contributor: Ninez <triplesquarednine@gmail.com>

pkgname=python-linux-procfs
pkgver=0.7.3
pkgrel=1
pkgdesc="Linux /proc abstraction classes for python"
arch=(any)
url="https://git.kernel.org/pub/scm/libs/python/python-linux-procfs/python-linux-procfs.git"
license=(GPL-2.0-only)
depends=(
  python
  python-six
)
makedepends=(
  python-build
  python-installer
  python-setuptools
  python-wheel
)
source=($url/snapshot/$pkgname-$pkgver.tar.gz)
sha512sums=('650c4d965177c2422961d7131a77c23af8cf583194d2ddcc0472ee3369978427b8d2f88a0ce6651e1141274a8f56a33adc4ce8b1f20534c737a09a7672b5818d')
b2sums=('5a2296310bca86821bfaa9c1da8c036f300a9b551c58ccc4f2ea66da93c9f971f635f99164f3809634c0b24c93bda4e9cb72b76d620f22bff8c69a9c7a1887ab')

build() {
  cd $pkgname-$pkgver
  python -m build --wheel --no-isolation
}

check() {
  cd $pkgname-$pkgver
  python bitmasklist_test.py
}

package() {
  cd $pkgname-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl
}
